package com.fengmi.security;

import com.fengmi.vo.ResultVO;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author 123
 * @Date 2022/2/9 20:32
 * @Version 1.0
 */

@ControllerAdvice
public class CustomerAccessExceptionResolver {


    @ExceptionHandler(AccessDeniedException.class)
    @ResponseBody
    public ResultVO handler(){


        return new ResultVO(false,"access deny","403");
    }
}